package org.igeek.config.bean.ch01;

import org.springframework.context.annotation.Bean;

/**
 * @package org.igeek.config.ch01
 * @Description 配置类
 * @Author LittlePunk [296526219@qq.ccom]
 * @Version 2022.1
 * @Date 2023/11/13 15:11
 */
//@ComponentScan  配置扫描包的路径
//@ComponentScan("org.igeek.config.ch01")
public class MyConfig {
    //3.通过bean的方式配置实例   config配置类+@Bean  方法名就是实例的id
    //将当前方法的返回值存入IOC容器中
    @Bean
    public Person pp(){
        return new Person("丽丽","22");
    }
}
